package com.cskaoyan.mall.model.orders;

import java.sql.Time;
import java.sql.Timestamp;

/**
 * @author: jyf2000jyf
 */
public class OrdersByPageVOInnerOrderInfo {
    private Integer id;
    private Integer userId;
    private Integer goodsDetailId;
    private String goods;
    private String spec;
    private Integer goodsNum;
    private Double amount;
    private Integer stateId;
    private String state;
    private Timestamp time;
    private OrdersByPageVOInnerUserInfo user = new OrdersByPageVOInnerUserInfo();
    private String address;
    private String phone;
    private String nickname;
    private String name;

    public OrdersByPageVOInnerOrderInfo() {
    }

    public OrdersByPageVOInnerOrderInfo(Integer id, Integer userId, Integer goodsDetailId, String goods, String spec, Integer goodsNum, Double amount, Integer stateId, String state, Timestamp time, OrdersByPageVOInnerUserInfo user, String address, String phone, String nickname, String name) {
        this.id = id;
        this.userId = userId;
        this.goodsDetailId = goodsDetailId;
        this.goods = goods;
        this.spec = spec;
        this.goodsNum = goodsNum;
        this.amount = amount;
        this.stateId = stateId;
        this.state = state;
        this.time = time;
        this.user = user;
        this.address = address;
        this.phone = phone;
        this.nickname = nickname;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGoodsDetailId() {
        return goodsDetailId;
    }

    public void setGoodsDetailId(Integer goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public Integer getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(Integer goodsNum) {
        this.goodsNum = goodsNum;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getStateId() {
        return stateId;
    }

    public void setStateId(Integer stateId) {
        this.stateId = stateId;
        this.stateId = stateId;
        if (stateId == 0) {
            setState("未付款");
        } else if (stateId == 1) {
            setState("未发货");
        } else if (stateId == 2) {
            setState("已发货");
        } else {
            setState("已到货");
        }
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public OrdersByPageVOInnerUserInfo getUser() {
        return user;
    }

    public void setUser(OrdersByPageVOInnerUserInfo user) {
        this.user = user;
    }

    public void setAddress(String address) {
        user.setAddress(address);
    }

    public void setPhone(String phone){
        user.setPhone(phone);
    }

    public void setNickname(String nickname) {
        user.setNickname(nickname);
    }

    public void setName(String name) {
        user.setName(name);
    }

    public Timestamp getTime() {
        return time;
    }

    public void setTime(Timestamp time) {
        this.time = time;
    }
}
